﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DzzzrTeamManager2.ServiceReference1;
using System.Diagnostics;

namespace Dzzzr
{
	public partial class LoginForm : Form
	{
		DzzzrTeamManagerServiceClient tmsc = new DzzzrTeamManagerServiceClient();
		User user;
		public LoginForm()
		{
			InitializeComponent();
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			try
			{
				user = new DzzzrTeamManagerServiceClient().LoginUser(txtLogin.Text, txtPassword.Text);
				if (user != null)
				{
				}
			}
			catch (Exception ex)
			{
				Debug.WriteLine(ex.ToString());
				MessageBox.Show(ex.Message);
			}
		}

		private void btnTeam_Click(object sender, EventArgs e)
		{
			Team team = new DzzzrTeamManagerServiceClient().GetUserTeam2(user);
			if (team != null)
			{
			}
		}
	}
}
